package cn.johnyu.consumer;

import commons.Greeter;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableDubbo
public class ConsumerApp {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApp.class,args);
    }

//    @DubboReference
//    private Greeter greeter;
//
//    @Bean
//    public ApplicationRunner applicationRunner(){
//        return args -> {
//            System.out.println(greeter);
//            for (int i = 0; i < 3; i++) {
//                System.out.println(greeter.sayHello("john"));
//            }
//        };
//    }
}
